<template>
  <div>
    <!-- <MyHeader :person="person"/>//这样不太对 -->

    <!-- 批量传递props -->
    <MyHeader v-bind="person" />
    
    <h1>点我累加</h1>
    <Count />
    <h1>点我累加2</h1>
    <Count :num="2" />
    <hr>
    <h1>点我累加3</h1>
    <Count :num="3" />

    <hr />
  </div>
</template>

<script>
import Count from "./components/Count";
import MyHeader from "./components/MyHeader";
export default {
  name: "App",
  data(){
    return{
      //给MyHeader传person
      person:{
        name: "laowang",
        age: 18,
        sex: "nan",
      }
    }
  },
  components: {
    Count,
    MyHeader
  },
};
</script>

<style scoped>
</style>